package com.queen.testretrofitrxjava.internal.di.modules;

import android.content.Context;

import com.queen.testretrofitrxjava.applications.ApplicationController;
import com.queen.testretrofitrxjava.http.HttpMethods;
import com.queen.testretrofitrxjava.http.MovieService;

import javax.inject.Inject;
import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

/**
 * Created by liukun on 16/3/18.
 */
@Module(includes = {ApiClientModule.class})
public class ApplicationModule {

    private ApplicationController application;
    public ApplicationModule(ApplicationController application) {
        this.application = application;
    }

    @Singleton
    @Provides
    Context provideContext(){
        return application;
    }

    @Singleton
    @Provides
    HttpMethods provideHttpMethods(MovieService movieService){
        return new HttpMethods(movieService);
    }

}
